如何快速新建代码片段创建vue2模板 | 您所在的位置:网站首页 › vue 创建模板 › 如何快速新建代码片段创建vue2模板 |
快速创建vue2代码片段
首先安装vscode,可以去官网或者电脑应用商店自行下载 ( 例如联想电脑:联想应用商店 ) [vscode官网]: code.visualstudio.com/Download 选择对应系统的版本,进行安装 提示:prefix:是选择创建命令,description:是方便识别此代码片段的作用 { // Place your snippets for vue here. Each snippet is defined under a snippet name and has a prefix, body and // description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are: // $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the // same ids are connected. // Example: // "Print to console": { // "prefix": "log", // "body": [ // "console.log('$1');", // "$2" // ], // "description": "Log output to console" // } "Print to console": { "prefix": "vue", "body": [ "", " \n", " ", "\n", "", "export default {", " props: {\n", " },", " components: {\n", " },", " data() {", " return {\n", " };", " },", " computed: {\n", " },", " watch: {\n", " },", " created() {\n", " },", " mounted() {\n", " },", " methods: {\n", " },", "};", "\n", "\n", "\n", ], "description": "Create vue template" } } 这样就能快速创建vue2模板,省去了一些写代码的时间 |
CopyRight 2018-2019 实验室设备网 版权所有 |